<?php
/**
 * 配置文件兼容配置方式
 */
return array(
    'DB_TYPE' => 'poolconnect',
    'DB_HOST' => 'localhost',
    'DB_NAME' => 'thinkphp',
    'DB_USER' => 'root',
    'DB_PWD' => '',
    'DB_PORT' => '3306',
    'DB_PREFIX' => 'tk_',
    );
    
    ?>
<?php
/**
 * PHP-cp默认配置方式，支持多数据库，读写分离
 */
return array(
'DB_TYPE' => 'poolconnect',
    "phpcp"=>array(
	    'master' => array(
		'data_source' => "mysql:host=127.0.0.1;dbname=thinkcmf",
		'username' => "root",
		'pwd' => "2911334q",
		'options' => array(
		    PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
		    PDO::ATTR_TIMEOUT => 3,
		    PDO::ATTR_CASE => PDO::CASE_UPPER,
		),
	    ),
	    'slave' => array(
		"0" => array(
		    'data_source' => "mysql:host=127.0.0.1;dbname=thinkcmf",
		    'username' => "root",
		    'pwd' => "2911334q",
		    'options' => array(
		        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
		        PDO::ATTR_TIMEOUT => 3,
		        PDO::ATTR_CASE => PDO::CASE_UPPER,
		    ),
		),
		"1" => array(
		    'data_source' => "mysql:host=127.0.0.1;dbname=thinkcmf",
		    'username' => "root",
		    'pwd' => "2911334q",
		    'options' => array(
		        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
		        PDO::ATTR_TIMEOUT => 3,
		        PDO::ATTR_CASE => PDO::CASE_LOWER,
		    ),
		),
	    ),
	),
);